package com.cursor.service;

import com.cursor.entity.Notification;
import com.cursor.repository.NotificationRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class NotificationService {
    
    private final NotificationRepository notificationRepository;
    
    public List<Notification> getAllActiveNotifications() {
        return notificationRepository.findByIsActiveTrueOrderByCreatedAtDesc();
    }
} 